<template>
  <main class="taskCase_container">
    <h2>需求决策结果</h2>
    <custom-table
      :columns="decisionColumns"
      :tableData="decisionData"
      :height="'24vh'"
      expand
    >
      <template #expand="{index}">
        <custom-table
          index
          :columns="decisionChildColumns"
          :tableData="decisionData[index].gcxqPointList"
        />
      </template>
    </custom-table>

    <div class="taskCase_container_table">
      <div class="taskCase_container_tabletop">
        <span>任务方案列表</span>

        <el-button @click="handleIndicatorWeight" type="primary" size="small"
          >指标树配置</el-button
        >
      </div>
      <el-table
        :data="tableData"
        style="width: 100%"
        stripe
        class="mainTable"
        height="20vh"
      >
        <el-table-column label="序号" type="index" width="50" />
        <el-table-column show-overflow-tooltip label="元任务编号" prop="yrwbh">
        </el-table-column>
        <el-table-column show-overflow-tooltip label="目标编号" prop="mbbh">
        </el-table-column>
        <el-table-column show-overflow-tooltip label="目标经度" prop="mbjd">
        </el-table-column>
        <el-table-column show-overflow-tooltip label="目标纬度" prop="mbwd">
        </el-table-column>
        <el-table-column show-overflow-tooltip label="卫星标识" prop="wxbs">
        </el-table-column>
        <el-table-column show-overflow-tooltip label="传感器标识" prop="cgqbs">
        </el-table-column>
        <el-table-column show-overflow-tooltip label="优先级" prop="yxj">
        </el-table-column>
        <el-table-column show-overflow-tooltip label="开始时间" prop="kssj">
        </el-table-column>
        <el-table-column show-overflow-tooltip label="结束时间" prop="jssj">
        </el-table-column>

        <el-table-column
          show-overflow-tooltip
          label="中心点访问时刻"
          prop="zxdfwsk"
        >
        </el-table-column>
        <el-table-column show-overflow-tooltip label="侧摆角" prop="cbj">
        </el-table-column>
        <el-table-column show-overflow-tooltip label="太阳高度角" prop="tygdj">
        </el-table-column>
        <el-table-column
          show-overflow-tooltip
          label="数传开始时间"
          prop="sckssj"
        >
        </el-table-column>
        <el-table-column
          show-overflow-tooltip
          label="数传结束时间"
          prop="scjssj"
        >
        </el-table-column>
      </el-table>
    </div>

    <div
      style="display: flex;justify-content: space-between;align-items: center;"
    >
      <h2>结果评估</h2>
      <el-button size="small" type="primary" @click="countResult"
        >评估</el-button
      >
    </div>
    <el-row :gutter="20">
      <el-col :xs="24" :sm="24" :lg="18">
        <div class="informationStatistics flex-between flex m-t-0">
          <div :class="['circle', znjcJsonStr.rwwcl == 0 ? 'orange' : 'green']">
            <p class="statistical_num">{{ znjcJsonStr.rwwcl }}</p>
            <p class="title">任务完成率</p>
            <p class="title">权重：{{ recordInputWeights.rwwcl }}</p>
          </div>
          <div
            :class="['circle', znjcJsonStr.gcsxxjz == 0 ? 'orange' : 'green']"
          >
            <p class="statistical_num">{{ znjcJsonStr.gcsxxjz }}</p>
            <p class="title">观测时效性均值</p>
            <p class="title">权重：{{ recordInputWeights.gcsxxjz }}</p>
          </div>
          <div
            :class="['circle', znjcJsonStr.gcsxxfc == 0 ? 'orange' : 'green']"
          >
            <p class="statistical_num">{{ znjcJsonStr.gcsxxfc }}</p>
            <p class="title">观测时效性方差</p>
            <p class="title">权重：{{ recordInputWeights.gcsxxfc }}</p>
          </div>
          <div
            :class="['circle', znjcJsonStr.wxfzjh == 0 ? 'orange' : 'green']"
          >
            <p class="statistical_num">{{ znjcJsonStr.wxfzjh }}</p>
            <p class="title">卫星负载均衡</p>
            <p class="title">权重：{{ recordInputWeights.wxfzjh }}</p>
          </div>
        </div>
        <div class="informationStatistics flex-between flex m-t-0">
          <div :class="['circle', znjcJsonStr.cbjjz == 0 ? 'orange' : 'green']">
            <p class="statistical_num">{{ znjcJsonStr.cbjjz }}</p>
            <p class="title">侧摆角均值</p>
            <p class="title">权重：{{ recordInputWeights.cbjjz }}</p>
          </div>
          <div :class="['circle', znjcJsonStr.cbjfc == 0 ? 'orange' : 'green']">
            <p class="statistical_num">{{ znjcJsonStr.cbjfc }}</p>
            <p class="title">侧摆角方差</p>
            <p class="title">权重：{{ recordInputWeights.cbjfc }}</p>
          </div>
          <div
            :class="['circle', znjcJsonStr.tygdjjz == 0 ? 'orange' : 'green']"
          >
            <p class="statistical_num">{{ znjcJsonStr.tygdjjz }}</p>
            <p class="title">太阳高度角均值</p>
            <p class="title">权重：{{ recordInputWeights.tygdjjz }}</p>
          </div>
          <div
            :class="['circle', znjcJsonStr.tygdjfc == 0 ? 'orange' : 'green']"
          >
            <p class="statistical_num">{{ znjcJsonStr.tygdjfc }}</p>
            <p class="title">太阳高度角方差</p>
            <p class="title">权重：{{ recordInputWeights.tygdjfc }}</p>
          </div>
        </div>
      </el-col>

      <el-col :xs="24" :sm="24" :lg="6">
        <div
          class="informationStatistics"
          style="height: 38vh;display: flex;align-items: center;justify-content: center;"
        >
          <div
            class="circle single-height yellow"
            style="justify-content: center;height: 100%;"
          >
            <div>
              <p class="statistical_num">{{ znjcJsonStr.final }}</p>
              <p class="title">结果</p>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>

    <flow ref="assessmentflow" @weightCallback="weightCallback" />
  </main>
</template>

<script src="./index.js"></script>
<style lang="scss" src="./index.scss" scoped></style>
<style lang="scss" src="../taskPlanning/index.scss"></style>
